package com.ruoyi.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.SpecTypeMapper;
import com.ruoyi.product.domain.SpecType;
import com.ruoyi.product.service.ISpecTypeService;

/**
 * 规格类型Service业务层处理
 * 
 * @author liuhuizhong
 * @date 2025-08-07
 */
@Service
public class SpecTypeServiceImpl implements ISpecTypeService 
{
    @Autowired
    private SpecTypeMapper specTypeMapper;

    /**
     * 查询规格类型
     * 
     * @param id 规格类型主键
     * @return 规格类型
     */
    @Override
    public SpecType selectSpecTypeById(Long id)
    {
        return specTypeMapper.selectSpecTypeById(id);
    }

    /**
     * 查询规格类型列表
     * 
     * @param specType 规格类型
     * @return 规格类型
     */
    @Override
    public List<SpecType> selectSpecTypeList(SpecType specType)
    {
        return specTypeMapper.selectSpecTypeList(specType);
    }

    /**
     * 新增规格类型
     * 
     * @param specType 规格类型
     * @return 结果
     */
    @Override
    public int insertSpecType(SpecType specType)
    {
        return specTypeMapper.insertSpecType(specType);
    }

    /**
     * 修改规格类型
     * 
     * @param specType 规格类型
     * @return 结果
     */
    @Override
    public int updateSpecType(SpecType specType)
    {
        return specTypeMapper.updateSpecType(specType);
    }

    /**
     * 批量删除规格类型
     * 
     * @param ids 需要删除的规格类型主键
     * @return 结果
     */
    @Override
    public int deleteSpecTypeByIds(Long[] ids)
    {
        return specTypeMapper.deleteSpecTypeByIds(ids);
    }

    /**
     * 删除规格类型信息
     * 
     * @param id 规格类型主键
     * @return 结果
     */
    @Override
    public int deleteSpecTypeById(Long id)
    {
        return specTypeMapper.deleteSpecTypeById(id);
    }
}
